package sample.crawler;

import javafx.scene.control.Label;
import sample.enums.MapExecCode;

import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

public class StatusUpdate implements Runnable{

    private Label status;

    private Map<String, Future> map;

    public StatusUpdate(){

    }

    public StatusUpdate(Label status, Map<String, Future> map) {
        this.status = status;
        this.map = map;
    }
    @Override
    public void run() {
        map.keySet().forEach(x->{
            Future future = map.get(x);
            Integer code = null;
            try {
                code = (Integer) future.get();

            } catch (InterruptedException e) {
                e.printStackTrace();
            } catch (ExecutionException e) {
                e.printStackTrace();
            }
        });
    }
}
